/**
 * AirlineMap.java
 * 2010-1-31
 */
package com.dlplay.flightinfo.source.map;

import java.util.HashMap;
import java.util.Map;

import com.dlplay.flightinfo.data.AirlineCode;

/**
 * @author zhao yu
 *
 */
public abstract class AirlineMap {
	private static Map<AirlineCode, String> stringMap = new HashMap<AirlineCode, String>();
	private static Map<String, AirlineCode> codeMap = new HashMap<String, AirlineCode>();
	private static boolean init = false;
	private static void init()
	{
		if(!init)
		{
			stringMap.put(AirlineCode.CA, "中国国航");
			codeMap.put("中国国航",AirlineCode.CA);
			init=true;
		}
	}
	public static final String getString(AirlineCode c){
		init();
		return stringMap.get(c);
	}
	
	public static final AirlineCode getCode(String s)
	{
		init();
		return codeMap.get(s);
	}
}
